<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('产品溯源')" />
</head>
<body style="background: #e5f0fc;">
    <div class="wrapper wrapper-content animated fadeInRight" th:if="${resultMsg != null}" th:text="${resultMsg}"></div>
    <div class="wrapper wrapper-content animated fadeInRight" th:if="${productTraceability != null}" th:object="${productTraceability}">
        <h1 th:text="#{productTraceability}">产品溯源</h1>
        <table style="font-size: 18px;">
            <tr>
                <td>[[#{traceabilityCode}]]</td>
                <td><span th:text="*{traceabilityCode}"></span></td>
            </tr>
            <tr>
                <td>[[#{productionBatch}]]</td>
                <td><span th:text="*{productionBatch}"></span></td>
            </tr>
            <tr>
                <td>[[#{executiveStandard}]]</td>
                <td><span th:text="*{executiveStandard}"></span></td>
            </tr>
            <tr>
                <td>[[#{guaranteePeriod}]]</td>
                <td><span th:text="*{guaranteePeriod}"></span></td>
            </tr>
            <tr>
                <td>[[#{countryOfOrigin}]]</td>
                <td><span th:text="*{countryOfOrigin}"></span></td>
            </tr>
            <tr>
                <td>[[#{productionQualification}]]</td>
                <td><span th:text="*{productionQualification}"></span></td>
            </tr>
            <tr>
                <td>[[#{salesTerritory}]]</td>
                <td><span th:text="*{salesTerritory}"></span></td>
            </tr>
            <tr>
                <td>[[#{serviceCall}]]</td>
                <td><span th:text="*{countryCode}"></span>-<span th:text="*{phoneNumber}"></span></td>
            </tr>
            <tr>
                <td>[[#{serviceInfo}]]</td>
                <td><span th:text="*{serviceInfo}"></span></td>
            </tr>
        </table>

        <table style="font-size: 18px;" th:if="*{reportList != null}">
            <tr th:each="item: ${productTraceability.reportList}">
                <td>[[#{inspectionReport}]] [[${itemStat.index}+1]] &nbsp;&nbsp;<a th:href="${item.testReportUrl}" th:text="#{viewPdf}">查看PDF</a>
                </td>
            </tr>
            <tr th:each="item: ${productTraceability.reportList}">
                <td>
                    <img th:src="${item.reportImageUrl}" width="350px"/>
                </td>
            </tr>
        </table>
    </div>
</body>
</html>